
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> # Script to run QAP
> library(sna)
Loading required package: statnet.common

Attaching package: 'statnet.common'

The following objects are masked from 'package:base':

    attr, order

Loading required package: network

'network' 1.18.1 (2023-01-24), part of the Statnet Project
* 'news(package="network")' for changes since last version
* 'citation("network")' for citation information
* 'https://statnet.org' for help, support, and other information

sna: Tools for Social Network Analysis
Version 2.7-1 created on 2023-01-24.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.

Warning messages:
1: package 'sna' was built under R version 4.2.3 
2: package 'statnet.common' was built under R version 4.2.3 
3: package 'network' was built under R version 4.2.3 
> library(doParallel)
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
> library(doRNG)
Loading required package: rngtools
> library(fastglm)
Loading required package: bigmemory
Warning message:
package 'bigmemory' was built under R version 4.2.3 
> 
> source("fast_qap.R")
> 
> # Load the followers adjacency matrix
> y <- readRDS("processed_data/followers_adjacencyMatrix.Rds")
> # Load the predicting matrices
> load("processed_data/QAP_predicting_matrices.RData")
> # load simulated edgelists
> load("simulated_follower_networks.RData")
> 
> # Parallel implementation to run QAP
> cl <- makeCluster(3)
> registerDoParallel(cl)
> set.seed(10)
> system.time(qap_res <- foreach(i=26:50,.packages=c("sna", "doRNG","fastglm")) %dorng% {
+   ys <- y
+   ys[,] <- 0
+   ys[as.matrix(sim_els[[i]])] <- 1
+   qap_sim <- netlogit_big(ys, predicting_matrices, reps = 100,nullhyp="qapy")
+   save(list="qap_sim",file=paste("./qap_power_results/qap_sim_follow",i,".RData",sep=""))
+ })
      user     system    elapsed 
    16.581      4.483 270883.192 
> stopCluster(cl)
> 
> 
> 
> 
> 
> proc.time()
      user     system    elapsed 
    42.488      6.691 270913.051 

 *** caught bus error ***
address 0x2b0676b5d16c, cause 'non-existent physical address'

Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(x)
 4: cleanup(kill = tools::SIGKILL, detach = TRUE, shutdown = TRUE)
 5: (function (e) cleanup(kill = tools::SIGKILL, detach = TRUE, shutdown = TRUE))(<environment>)
An irrecoverable exception occurred. R is aborting now ...
